home *** CD-ROM | disk | FTP | other *** search
/ Network Supervisor's Toolkit / Network Supervisor's Toolkit.iso / novell / nw386 / file-4.386 < prev    next >
Text File  |  1996-07-10  |  6KB  |  159 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11. Chapter 4
  12. Files and Directories
  13.  
  14.  
  15.  
  16. NetWare 386 also offers several new features relating to
  17. the organization of files and directories. This chapter
  18. includes the following sections:
  19.  
  20.    ■ Directory Tables
  21.    ■ Multiple Name Spaces
  22.    ■ Sparse Files
  23.    ■ Salvage Files
  24.  
  25.  
  26.  
  27. Directory Tables
  28.  
  29. Each volume contains a file called the Directory Table,
  30. which is divided into one or more directory blocks.
  31. Regardless of the disk allocation block size for that
  32. volume, the size of each directory block is always 4KB.
  33. Each directory block can accommodate 32 128-byte entries.
  34. There are several kinds of entries:  file entries for
  35. various workstation operating systems, directory entries
  36. for various workstation operating systems, file trustee
  37. entries, directory trustee entries, and free entries.
  38. Each entry stores information about files, directories,
  39. file trustees, directory trustees, or other entities. 
  40.  
  41. Volume SYS starts out with six directory blocks in its
  42. Directory Table. Other volumes start out with two
  43. directory blocks in their Directory Tables. When a volume
  44. needs to add another directory block to its Directory
  45. Table, the server allocates another block. The maximum
  46. number of directory blocks per volume is 65,536. Since each block can accommodate 32 entries, the maximum
  47. number of Directory Table entries per volume is
  48. 2,097,152. The server does not cache entire Directory
  49. Tables. It only caches directory blocks that are in use.
  50.  
  51. Multiple Name Spaces
  52.  
  53. Each file stored on a given volume has a DOS name, a name
  54. that any DOS workstation operating system can recognize.
  55. This DOS name is stored in a file entry in the volume's
  56. Directory Table. The file entry stores information such
  57. as file attributes, the length of the DOS file name (1
  58. byte),  the DOS file name itself (1 to 12 bytes), the
  59. owner object ID, the creation date and time, and a link
  60. to a file trustee entry. 
  61.  
  62. However, different workstation operating systems (DOS,
  63. OS/2, UNIX, Macintosh) may have different conventions for
  64. naming files. These conventions include name length,
  65. legal characters, case-sensitivity or insensitivity, data
  66. and resource forks, etc. To allow various workstations
  67. to create files using their own familiar naming
  68. conventions, NetWare 386 supports Multiple Name Spaces.
  69.  
  70. Multiple Name Spaces really means multiple directory
  71. entries. For example, a server that is configured to
  72. support DOS and Macintosh file names would generate two
  73. 128-byte file entries for every file. One file entry
  74. would contain the file attributes, owner object ID,
  75. creation date and time, DOS file name generated by a
  76. server algorithm, etc. The second file entry would
  77. contain the Macintosh file name and Macintosh Finder
  78. information. Servers that support Multiple Name Spaces
  79. use one file/directory entry for each name space
  80. supported. 
  81.  
  82. The preceding two paragraphs apply to directory names as
  83. well.
  84.  
  85. NetWare 386 also supports multiple-byte characters for
  86. file, directory, and bindery names. This applies to
  87. workstation operating systems that require 2 bytes to
  88. represent one character. With NetWare 386, wildcard
  89. pattern-matching has changed to accommodate multiple-byte
  90. characters. Wildcard pattern-matching now uses two
  91. characters. The first character is 0FFh and the second
  92. character is a wildcard character like * or ?. Because NetWare 386 supports a maximum file size of 4GB,
  93. files can span physical disks. File size is limited by
  94. 4-byte byte-count fields and by 4-byte seek pointers. As
  95. discussed earlier, minimum file size is one disk
  96. allocation block, whether the disk allocation block is
  97. 4KB, 8KB, 16KB, 32KB, or 64KB.
  98.  
  99. Sparse Files
  100.  
  101. NetWare 386 also supports sparse files. Databases
  102. sometimes create sparse files. The following is an
  103. example. Suppose the disk allocation block size for
  104. volume VOL1 is 4KB. Also suppose that a database opens
  105. a new file, seeks out to the 1,048,576th byte, writes 5
  106. bytes of data, and closes the file. An inefficient server
  107. would save to disk this entire file: 256 zero-filled disk
  108. allocation blocks (the first 1MB) and then one more disk
  109. allocation block with 5 bytes of data and 4,091 zeroes.
  110. This method wastes 1MB of disk space. The NetWare server
  111. does not write the initial, zero-filled megabyte to disk.
  112. It writes only the last block to disk. If a program tries
  113. to read from the file's first megabyte, the server
  114. generates and returns zeroes.
  115.  
  116. Salvage Files
  117.  
  118. NetWare 386 treats deleted files differently than did
  119. past versions of NetWare. In the past, a user could only
  120. recover the file (or files) deleted in the last ERASE or
  121. DELETE command. Files deleted in earlier delete commands
  122. were lost forever. NetWare 386 saves deleted files (and
  123. all information about those files) in their default
  124. directory until the server runs out of disk allocation
  125. blocks on the volume or until the user deliberately
  126. purges the deleted files. If the user deletes the file's
  127. default directory too, the file is saved in a DELETED.SAV
  128. directory located in the volume's root directory.
  129.  
  130. The user can view a list of deleted files in a directory,
  131. and recover files using the SALVAGE utility. Recovered
  132. files contain information about who deleted the files and
  133. when they were deleted. This means that a lot of deleted
  134. files will remain in a recoverable state for a long time.
  135. When the server does run out of disk allocation blocks,
  136. it purges deleted files on a first deleted-first purged
  137. basis. Files and directories can also be purged immediately, as
  138. they are deleted. There are two possible ways to do this: 
  139. Using the SET command to disable the salvageable file
  140. feature, or setting the Purge file and directory
  141. attribute.
  142.  
  143. To use the SET command, simply type SET and the
  144. parameter, Immediate Purge of Deleted Files. Set the
  145. Immediate Purge to On, and all files will be purged
  146. immediately when they are deleted. This increases
  147. performance, but at the cost of losing the salvageable
  148. file feature.
  149.  
  150. When a file is flagged with the Purge attribute, the file
  151. is purged when it is deleted. When a directory is flagged
  152. with the Purge attribute, any file in that directory is
  153. purged when the file is deleted. Such files and
  154. directories cannot be recovered with the SALVAGE utility.
  155. (For more information on the Purge attribute, see Chapter
  156. 5, File and Directory Security.) 
  157.  
  158.  
  159.